#! /usr/bin/python3
# author ckm


# 线程共享全部资源，可以共享访问，可以任意增删改查.(非安全)
from threading import Thread
import time

def work1(nums:list):
    nums.append(44)
    print('---work1---',nums)


def work2(nums:list):
    time.sleep(1)
    print('---work2---',nums)

def main():
    g_nums = [11,22,33]
    t1 = Thread(target=work1,args=(g_nums,))
    t1.start()
    t2 = Thread(target=work2,args=(g_nums,))
    t2.start()
if __name__ == '__main__':
    main()